{extend name="base" /}
{block name="body"}
<div class="layui-card">
  <div class="layui-card-body">
    <blockquote class="layui-elem-quote layui-text">
        注意事项：用户名只能为汉字、字母、数字不能有特殊字符，用户登陆后需自行修改！重置功能为重置密码。默认重置密码后新密码为<span class="text-danger">{$pwd}</span>
    </blockquote>
    <div class="layui-form-item">
      <form class="layui-form layui-form-pane" action="{:request()->url()}" >
        <div class="layui-input-inline">
            <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="{if $Request.get.title}{$Request.get.title}{else}请输入关键字{/if}" class="layui-input">
        </div>
        <div class="layui-input-inline">
            <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">{$Think.lang.search}</button>
            <button type="reset" class="layui-btn layui-btn-primary">{$Think.lang.reset}</button>
        </div>
        </form>
      <button class="layui-btn layui-btn-normal open-popup" data-title="{$Think.lang.add}" data-url="{:url('add')}"><i class="fa fa-plus"></i>{$Think.lang.add}</button>
    </div>
    <table class="layui-table layui-form" lay-skin="line">
        <thead>
            <tr>
                <th>{$Think.lang.id}</th>
                <th>{$Think.lang.name}</th>
                <th>{$Think.lang.phone}</th>
                <th>{$Think.lang.username}</th>
                <th>{$Think.lang.sex}</th>
                <th>{$Think.lang.group}</th>
                <th>{$Think.lang.createTime}</th>
                <th>{$Think.lang.status}</th>
                <th>{$Think.lang.handle}</th>
            </tr>
        </thead>
        <tbody>
            {volist name="list" id="v" empty="$empty"}
            <tr>
                <td>{$i}</td>
                <td>{$v.user_name}</td>
                <td>{$v.mobile_phone}</td>
                <td>{$v.nick_name}</td>
                <td>{$v.sex}</td>
                <td>{$v.name}</td>
                <td>{$v.create_time|date='Y-m-d'}</td>
                <td>
                    <input type="checkbox" name="status" value="{$v.id}" lay-skin="switch" lay-filter="*" lay-text="开启|禁用" data-url="{:url('edit')}" {if $v.status eq 1}checked{/if}>
                </td>
                <td>
                    <button class="layui-btn layui-btn-xs open-popup" data-title="{$Think.lang.edit}" data-url="{:url('edit', ['id' => $v.id])}"><i class="fa fa-edit"></i>{$Think.lang.edit}</button>
                    <button class="layui-btn layui-btn-{neq name='$v.id' value='1'}normal ajax-del{else}primary{/neq} layui-btn-xs" data-title="{$Think.lang.reset}" data-url="{:url('reset', ['id' => $v.id])}"><i class="fa fa-refresh"></i>{$Think.lang.reset}</button>
                    <button class="layui-btn layui-btn-{neq name='$v.id' value='1'}danger ajax-del{else}primary{/neq} layui-btn-xs" data-title="{$Think.lang.drop}" data-url="{:url('del', ['id' => $v.id])}"><i class="fa fa-trash-o"></i>{$Think.lang.drop}</button>
                </td>
            </tr>
            {/volist}
        </tbody>
    </table>
    <div class="page">{$list|raw}</div>
    </div>
</div>
{/block}
{block name="js"}
{/block}